package com.unidt.www.module.expert.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.unidt.www.framework.common.util.object.ConvertUtil;
import com.unidt.www.module.expert.domain.ExpertShieldingConditionDo;
import com.unidt.www.module.expert.mapper.ExpertShieldingConditionMapper;
import com.unidt.www.module.expert.service.InvitationConditionService;
import com.unidt.www.module.expert.vo.ShieldingConditionVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author sk
 * @Description:
 * @Date 2022/12/20 15:48
 **/
@Service
public class InvitationConditionServiceImpl implements InvitationConditionService {
    @Autowired
    ExpertShieldingConditionMapper expertShieldingConditionMapper;

    @Override
    public ShieldingConditionVo getDetail(Long invitationId) {
        LambdaQueryWrapper<ExpertShieldingConditionDo> lambdaQueryWrapper =
                new LambdaQueryWrapper();
        lambdaQueryWrapper.eq(ExpertShieldingConditionDo::getInvitationId,invitationId);
        ExpertShieldingConditionDo expertShieldingConditionDo =
                this.expertShieldingConditionMapper.selectOne(lambdaQueryWrapper);

        return ConvertUtil.convert(expertShieldingConditionDo,ShieldingConditionVo.class);
    }
}
